<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/css/login.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css"/>
    <style>

    </style>
</head>
<body>


<div class="layui-card">
    <div class="layui-card-header">宿舍信息</div>
    <div class="layui-card-body">
    <form class="layui-form" action="/dormitory/search" method="get">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="search" name="keyword" placeholder="学生名称" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <button class="layui-btn" lay-submit lay-filter="searchForm">搜索</button>
            </div>
        </div>
    </form>
    <div class="layui-form">
        <table class="layui-table">
                    <tr>
                        <th width="50">ID</th>
                        <th width="200">宿舍楼名称</th>
                        <th width="150">宿舍名称</th>
                        <th width="150">学生名称</th>
                        <th width="150">手机号码</th>
                        <th>操作</th>
                    </tr>
                    {% for dormitory in dormitory_list %}
                    <tr>
                        <td>{{ dormitory.id }}</td>
                        <td>{{ dormitory.lou }}</td>
                        <td>{{ dormitory.name }}</td>
                        <td>{{ dormitory.student }}</td>
                        <td>{{ dormitory.phone }}</td>
                        <td>
                            <button type="button" class="layui-btn layui-btn-sm"><a href="/dormitory/edit?option=detail&id={{ dormitory.id }}">详情</a></button>
                            <button type="button" class="layui-btn layui-btn-sm layui-btn-warm"><a href="/dormitory/edit?option=update&id={{ dormitory.id }}">编辑</a></button>
                            <button type="button" class="layui-btn layui-btn-sm layui-btn-danger"><a href="/dormitory/remove?id={{ dormitory.id }}">删除</a></button>
                        </td>
                    </tr>
                    {% endfor %}
                </table>
    </div>

    </div>
</div>

    <link rel="stylesheet" href="/static/layui/css/layui.css" type="text/css">
    <script src="/static/layui/layui.js" type="text/javascript"></script>
</body>
</html>